<div class="dashboard_item">
    <h1>Grupper</h1>
    {foreach from=$groups item=g key=k}
    <div>
        <h2>{$k}</h2>

        {foreach from=$perms item=p key=pp}
        <h3>{$pp}</h3>
                <table>
                    <tr><td>Item</td><td>Rights</td></tr>
                    {foreach from=$p item=perm key=item}
                    <tr>
                        <td>{$item}</td>
                        <td>
                        {foreach from=$perm item=right key=d}
                            {$d}<input type="checkbox" {if $groups.$k.$pp.$item.$d}checked="checked"{/if} name="{$k}[{$pp}][{$item}][{$d}]" value="true" />
                        {/foreach}
                        </td>
                    </tr>
                    {/foreach}
                </table>
        {/foreach}

    </div>
    {/foreach}
    <input type="submit" value="gem" />
</div>